package com.javapatterns.decorator.print.copy;

public class OrderItem {
	private String name;
	private int units;
	private double unitPrice;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getUnits() {
		return units;
	}

	public void setUnits(int units) {
		this.units = units;
	}

	public double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(double unitPrice) {
		this.unitPrice = unitPrice;
	}

	public double getSubTotal() {
		return unitPrice * units;
	}

	public void print() {
		System.out.println(name + "\t" + units + "\t$" + unitPrice + "\t$"
				+ getSubTotal());
	}

}
